com.highdeal.tax.hci
Class TaxDetailModel

java.lang.Object
  extended by com.highdeal.tax.hci.TaxDetailModel
All Implemented Interfaces:
XMLMarshallable

public class TaxDetailModel
extends java.lang.Object
implements XMLMarshallable

FOR INTERNAL USE ONLY - This class represents the tax data details generated by the SAP CC system during the charging process for a charged transaction; It completes the tax data (base amount, tax amount, total amount, tax code, tax status).

Internal Use Only

This class is for internal use only.

Details related to VAT system:

Details related to EZTax system:

See Also:
ChargedTransaction

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="taxDetail">
   <xs:complexType>
     <xs:choice>
       <xs:element name="eztaxDetail" minOccurs="0" maxOccurs="unbounded">
         <xs:complexType>
           <xs:attribute name="name" type="xs:string"/>
           <xs:attribute name="value" type="xs:string"/>
         </xs:complexType>
       </xs:element>
       <xs:element name="vatDetail" minOccurs="0" maxOccurs="unbounded">
         <xs:complexType>
           <xs:attribute name="name" type="xs:string"/>
           <xs:attribute name="value" type="xs:string"/>
         </xs:complexType>
       </xs:element>
     </xs:choice>
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String EZTAX_AUTHORITY_LEVEL
           
static java.lang.String EZTAX_TAX_AMOUNT
          EZTax
static java.lang.String EZTAX_TAX_LOG_DATA
           
static java.lang.String EZTAX_TAX_TYPE
           
static java.lang.String VAT_BUSINESS_CATEGORY
          VAT
static java.lang.String VAT_TAXATION_PLACE
           
 
Constructor Summary
TaxDetailModel()
          Builds an empty tax detail
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void addEZTaxDetail(java.lang.String name, java.lang.String value)
          Adds an EZTax tax detail associated with a value
 void addVatDetail(java.lang.String name, java.lang.String value)
          Adds a VAT tax detail associated with a value
 java.lang.String getEZTaxDetail(java.lang.String name)
          Gets the description associated with the given tax detail, if exists.
 java.lang.String getVatDetail(java.lang.String name)
          Gets the description associated with the given tax detail, if exists.
 boolean isValid()
          Returns true if the tax data is valid; Tax data is valid if its name is not null or empty.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 java.lang.String toString()
          Returns a string representation of the tax data detail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EZTAX_TAX_AMOUNT

public static final java.lang.String EZTAX_TAX_AMOUNT
EZTax

See Also:
Constant Field Values

EZTAX_TAX_TYPE

public static final java.lang.String EZTAX_TAX_TYPE
See Also:
Constant Field Values

EZTAX_AUTHORITY_LEVEL

public static final java.lang.String EZTAX_AUTHORITY_LEVEL
See Also:
Constant Field Values

EZTAX_TAX_LOG_DATA

public static final java.lang.String EZTAX_TAX_LOG_DATA
See Also:
Constant Field Values

VAT_BUSINESS_CATEGORY

public static final java.lang.String VAT_BUSINESS_CATEGORY
VAT

See Also:
Constant Field Values

VAT_TAXATION_PLACE

public static final java.lang.String VAT_TAXATION_PLACE
See Also:
Constant Field Values
Constructor Detail

TaxDetailModel

public TaxDetailModel()
Builds an empty tax detail

Method Detail

addEZTaxDetail

public void addEZTaxDetail(java.lang.String name,
                           java.lang.String value)
Adds an EZTax tax detail associated with a value

Parameters:
name - The name of the tax data detail
value - The value associated with the given tax data detail

addVatDetail

public void addVatDetail(java.lang.String name,
                         java.lang.String value)
Adds a VAT tax detail associated with a value

Parameters:
name - The name of the tax detail
value - The value associated with the given tax detail

getEZTaxDetail

public java.lang.String getEZTaxDetail(java.lang.String name)
Gets the description associated with the given tax detail, if exists.

Parameters:
name - The name of the tax detail
Returns:
The value associated with the given name, if exists, null otherwise.

getVatDetail

public java.lang.String getVatDetail(java.lang.String name)
Gets the description associated with the given tax detail, if exists.

Parameters:
name - The name of the tax detail
Returns:
the value associated with the given name, if exists, null otherwise.

isValid

public boolean isValid()
Returns true if the tax data is valid; Tax data is valid if its name is not null or empty.

Returns:
true if the tax detail is valid, false otherwise.

toString

public java.lang.String toString()
Returns a string representation of the tax data detail

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the tax detail.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)